home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 001 / piblist.arc / SETCOLOR.PAS < prev    next >
Pascal/Delphi Source File  |  1985-03-24  |  4KB  |  78 lines

  1. (*----------------------------------------------------------------------*)
  2. (*                Set/Reset Text Color Routines                         *)
  3. (*----------------------------------------------------------------------*)
  4. (*                                                                      *)
  5. (*   These routines set and reset the global text foreground and        *)
  6. (*   background colors.                                                 *)
  7. (*                                                                      *)
  8. (*----------------------------------------------------------------------*)
  9.  
  10.                    (* Global Text Color Variables *)
  11.  
  12. Var
  13.    Global_ForeGround_Color : Integer;
  14.    Global_BackGround_Color : Integer;
  15.  
  16. (*----------------------------------------------------------------------*)
  17. (*    Set_Global_Colors --- Reset global foreground, background cols.   *)
  18. (*----------------------------------------------------------------------*)
  19.  
  20. Procedure Set_Global_Colors( ForeGround, BackGround : Integer );
  21.  
  22. (*----------------------------------------------------------------------*)
  23. (*                                                                      *)
  24. (*     Procedure:  Set_Global_Colors                                    *)
  25. (*                                                                      *)
  26. (*     Purpose:    Sets global text foreground, background colors.      *)
  27. (*                                                                      *)
  28. (*     Calling Sequence:                                                *)
  29. (*                                                                      *)
  30. (*        Set_Global_Colors( ForeGround, BackGround : Integer );        *)
  31. (*                                                                      *)
  32. (*           ForeGround --- Default foreground color                    *)
  33. (*           BackGround --- Default background color                    *)
  34. (*                                                                      *)
  35. (*     Calls:   TextColor                                               *)
  36. (*              TextBackGround                                          *)
  37. (*                                                                      *)
  38. (*----------------------------------------------------------------------*)
  39.  
  40. Begin  (* Set_Global_Colors *)
  41.  
  42.    Global_ForeGround_Color := ForeGround;
  43.    GLobal_BackGround_Color := BackGround;
  44.  
  45.    TextColor     ( Global_ForeGround_Color );
  46.    TextBackground( Global_BackGround_Color );
  47.  
  48. End    (* Set_Global_Colors *);
  49.  
  50. (*----------------------------------------------------------------------*)
  51. (*  Reset_Global_Colors --- Reset global foreground, background cols.   *)
  52. (*----------------------------------------------------------------------*)
  53.  
  54. Procedure Reset_Global_Colors;
  55.  
  56. (*----------------------------------------------------------------------*)
  57. (*                                                                      *)
  58. (*     Procedure:  Reset_Global_Colors                                  *)
  59. (*                                                                      *)
  60. (*     Purpose:    Resets text foreground, background colors to global  *)
  61. (*                 defaults.                                            *)
  62. (*                                                                      *)
  63. (*     Calling Sequence:                                                *)
  64. (*                                                                      *)
  65. (*        Reset_Global_Colors;                                          *)
  66. (*                                                                      *)
  67. (*     Calls:   TextColor                                               *)
  68. (*              TextBackGround                                          *)
  69. (*                                                                      *)
  70. (*----------------------------------------------------------------------*)
  71.  
  72. Begin  (* Reset_Global_Colors *)
  73.  
  74.    TextColor     ( Global_ForeGround_Color );
  75.    TextBackground( Global_BackGround_Color );
  76.  
  77. End    (* Reset_Global_Colors *);
  78.